<?php

/**
 * Pes for PHP 5.3+
 *
 * Copyright (c) 2014 PESCMS (http://www.pescms.com)
 *
 * For the full copyright and license information, please view
 * the file LICENSE.md that was distributed with this source code.
 */

namespace App\Master\GET;


class Page extends \App\Master\Common {

    public function view() {
        if (empty($_GET['mark'])) {
            $this->jump($this->url('Master-Index-_404'));
        }
        $page = \Model\Content::findContent('page', $_GET['mark'], 'page_url_mark');
        if (empty($page)) {
            $this->jump($this->url('Master-Index-_404'));
        }

        $this->assign($page);
        $this->assign('title', $page['page_title']);

        $this->layout();
    }

}